package com.ylyq.ylxx.model.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

/**
 * @ClassName GetCreativeRequest
 * @Description TODO
 * @Author xiaweichao
 * @Date 2020/7/1 11:51
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "获取广告组创意的请求参数")
public class GetCreativeRequest {
    @ApiModelProperty(value = "广告主ID")
    @NotNull(message = "广告主ID不能为空")
    private Long advertiser_id;

    @ApiModelProperty(value = "页数默认值: 1")
    private Integer page;

    @ApiModelProperty(value = "页面大小默认值: 10")
    private Integer page_size;

    @ApiModelProperty(value = "查询字段集合, 如果指定, 则返回结果数组中, 每个元素是包含所查询字段的字典，默认全部指定\n" +
            "允许值: \"creative_id\", \"ad_id\", \"advertiser_id\", \"status\",\"opt_status\", \"image_mode\", \"title\", \"creative_word_ids\",\"third_party_id\", \"image_ids\", \"image_id\", \"video_id\",\"audit_reject_reason\", \"materials\"")
    private String[] fields;

    @ApiModelProperty(value = "过滤条件，若此字段不传，或传空则视为无限制条件，查看账号总创意")
    private FilteringGetCreativeRequest filtering;

    @NoArgsConstructor
    @Data
    public static class FilteringGetCreativeRequest {

        /**
         * advertiser_id : 12312321
         * advertiser_name : test_developer
         * advertiser_role : 1
         * is_valid : true
         */
        @ApiModelProperty(value = "按照campaign_id过滤")
        private Long campaign_id;
        @ApiModelProperty(value = "按照ad_id过滤")
        private Long ad_id;
        @ApiModelProperty(value = "按照creative_id过滤，最多传100个")
        private Long[] creative_ids;
        @ApiModelProperty(value = "按照creative_title过滤，支持模糊搜索")
        private String creative_title;
        @ApiModelProperty(value = "按照广告组推广目的过滤")
        private String landing_type;
        @ApiModelProperty(value = "按照ad出价方式过滤")
        private String pricing;
        @ApiModelProperty(value = "按照创意状态过滤，默认为返回“所有不包含已删除”，如果要返回所有包含已删除有对应枚举表示")
        private String status;
        @ApiModelProperty(value = "按照创意素材类型过滤")
        private String image_mode;
        @ApiModelProperty(value = "广告创意创建时间，格式yyyy-mm-dd，表示过滤出当天创建的广告创意")
        private String creative_create_time;
        @ApiModelProperty(value = "广告创意更新时间，格式yyyy-mm-dd，表示过滤出当天更新的广告组创意")
        private String creative_modify_time;
    }

}
